//
//  YRStoreManager.h
//  yanyi
//
//  Created by dyy-ios4 on 2023/6/20.
//

#import <Foundation/Foundation.h>

typedef enum {
    IAPPurchSuccess = 0,       // 购买成功
    IAPPurchFailed = 1,        // 购买失败
    IAPPurchCancel = 2,        // 取消购买
    IAPPurchVerFailed = 3,     // 订单校验失败
    IAPPurchVerSuccess = 4,    // 订单校验成功
    IAPPurchNotAllow = 5,      // 不允许内购
    
    IAPPurchGoodsMessageError //商品信息请求失败
} IAPPurchType;

NS_ASSUME_NONNULL_BEGIN

typedef void (^IAPCompletionHandle)(IAPPurchType type, NSString *message); //支付结果回调


@interface YRStoreManager : NSObject

+ (id)shareManager;

//isRecharge 是否是充值
- (void)startPurchaseWithID:(NSString *)purchID orderId:(NSString *)orderId isRechange:(BOOL)isRecharge completeHandle:(IAPCompletionHandle)handle;

@end

NS_ASSUME_NONNULL_END
